import {configureStore, getDefaultMiddleware} from "@reduxjs/toolkit";
import {countSlice} from "./slices/count";
import {loginSlice} from "./slices/login";
import {actionLog} from "./middlewares/log";

const store = configureStore({
  reducer: {
    sum: countSlice.reducer,
    isLogin: loginSlice.reducer
  },
  middleware: [...getDefaultMiddleware(), actionLog]
})

export default store;

export type RootState = ReturnType<typeof store.getState>;
